#ifndef __FLDRV_UART_H
#define __FLDRV_UART_H
#include <stdint.h>

#define UART_RCV_MIN_LEN	4				//串口接收有效数据最小长度

#define UART_TIME_OUT			8				//4ms * 8 = 32ms超时处理数据
#define UART1_TXBUF_SIZE	128		//设备端发送
#define UART1_RXBUF_SIZE	128		//设备端接收
#define UART2_TXBUF_SIZE	512		//slm320发送
#define UART2_RXBUF_SIZE	(512)	//slm320接收


#define UART1_HEAD			0xAA


//串口接收
typedef struct
{
	unsigned char	u8UartRcvTimeOut;
	unsigned short u16UartRxLen;
	unsigned char u8UartRxBuf[UART2_RXBUF_SIZE];
}fldrv_uart_rx_t;

void fldrv_uart_init(void);
void fldrv_uart_send_buf(char* data,uint8_t len);
fldrv_uart_rx_t fldrv_uart1_rcv_time_out_check(void);
fldrv_uart_rx_t fldrv_uart2_rcv_time_out_check(void);

#endif
